<?php

/*
  Victory	$6

  Worth 1 victory point for every Goat in deck, including this one

 */

class Goat extends Card implements iVictory, iKingdom, iAddiction {

    public function __construct() {
        parent::__construct("Goat", 6);
        $this->undoPlay = false;
        $this->undoBuy = true;
    }

    public function getDescription() {
        return array(
            "Worth 1 victory point for every Goat in deck, including this one.");
    }

    public function play(Game $game, $isRealCard) {
        return true;
    }

    public function getVictoryPoints(Game $game, $name) {
        $allCards = $game->getAllCards($name);
        $vp = 0;
        foreach ($allCards as $card) {
            if ($card instanceof Goat) {
                $vp += 1;
            }
        }
        return $vp;
    }

}

?>